]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Make ripple boxes initially invisible
authorRon Yorsten <rmy@tigress.co.uk>
Mon, 5 Dec 2011 09:32:04 +0000 (10:32 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 5 Dec 2011 09:39:14 +0000 (10:39 +0100)
The three boxes for the ripple animation are visible when created. This
means that the drag and drop code that searches for an actor to handle
the drag can find the ripple boxes instead of the Activities button or
hot corner. The latter can handle drag and drop while the ripple boxes
can't.
This is only a problem if drag and drop is attempted before the ripple
animation has been played: the boxes are made invisible at the end of
the animation. The fix is to just create the boxes invisible.

js/ui/layout.js

index c99c94177cf1c8f83184e7eea5296e60b00ebc3c..fb808ec52478d99edd8f4c8f34f61723df5585c7 100644 (file)
@@ -433,9 +433,9 @@ const HotCorner = new Lang.Class({
                              Lang.bind(this, this._onCornerLeft));
 
         // Cache the three ripples instead of dynamically creating and destroying them.
-        this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 });
-        this._ripple2 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 });
-        this._ripple3 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0 });
+        this._ripple1 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
+        this._ripple2 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
+        this._ripple3 = new St.BoxLayout({ style_class: 'ripple-box', opacity: 0, visible: false });
 
         Main.uiGroup.add_actor(this._ripple1);
         Main.uiGroup.add_actor(this._ripple2);